package cz.cvut.manatee.client;

import com.google.gwt.event.dom.client.ChangeEvent;
import com.google.gwt.event.dom.client.ChangeHandler;
import com.google.gwt.user.client.ui.TextBox;

public class TrimTextBox extends TextBox {

	public TrimTextBox() {
		super();
		
		this.addChangeHandler(new ChangeHandler() {
			public void onChange(ChangeEvent event) {
				TrimTextBox.this.trim();
			}
		});
	}
	
	
	
	
	protected void trim() {
		TrimTextBox.this.setValue( TrimTextBox.this.getValue().trim() );
	}
}
